package com;

import com.aop.LoginService;
import com.web.DemoController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author liuchenjun3
 * @Date 2018/1/3
 * @description
 * @see
 */
public class TestApplicationContext {
    public static void main(String args[]) {
        System.out.println("Hello World!");
        ApplicationContext applicationContext = new FileSystemXmlApplicationContext("classpath:spring-config.xml");
//        appCt2.getBean("beanId");
//        LoginService loginService = (LoginService) applicationContext.getBean("loginProxy");
        LoginService loginService = (LoginService) applicationContext.getBean("loginService");
        loginService.login("user1s");
        DemoController demoController = (DemoController) applicationContext.getBean("demoController");
        demoController.testUmP();
    }
}
